package com.zmn.mcc.persistence.interfaces.staff;

import com.zmn.mcc.common.dto.permit.DpermitLitDO;
import com.zmn.mcc.model.dto.dpermit.DpermitCountDO;
import com.zmn.mcc.model.entity.staff.McStaffDpermit;
import com.zmn.mcc.model.entity.staff.McStaffDpermitQuery;

import java.util.List;

/**
 * @author heguanghua
 * @since 2020/04/14 10:55
 */
public interface StaffDpermitDao {

    McStaffDpermit findByKey(McStaffDpermit staffDpermit);

    McStaffDpermit findByQuery(McStaffDpermitQuery query);

    List<McStaffDpermit> listPageByQuery(McStaffDpermitQuery query);

    List<McStaffDpermit> listByQuery(McStaffDpermitQuery query);

    List<Integer> listDataIdByQuery(McStaffDpermitQuery query);

    List<DpermitLitDO> listDpermitLitByQuery(McStaffDpermitQuery query);

    Integer countByQuery(McStaffDpermitQuery query);

    List<DpermitCountDO> countByQueryGroupByParentId(McStaffDpermitQuery query);


    Integer updateByKey(McStaffDpermit deptDpermit);

    Integer updateSubAllByQuery(McStaffDpermitQuery query);


    Integer insert(McStaffDpermit staffDpermit);

    Integer insertByBatch(List<McStaffDpermit> staffDpermits);


    Integer deleteByKey(McStaffDpermit staffDpermit);

    Integer deleteByQuery(McStaffDpermitQuery query);
}
